﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SimpleFactory.AbstractProduct;

namespace SimpleFactory.Product
{
    /// <summary>
    /// 除法
    /// </summary>
    public class Division : Operator
    {
        public override double GetResult()
        {
            if (NumberB == 0)
                throw new Exception("除数不能为零！");
            return NumberA / NumberB;
        }
    }
}
